using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace SpoonCore2.Tools
{
	public class DataWaiter<T>
	{
		private readonly AutoResetEvent _waiter = new AutoResetEvent(false);
		private T _data;

		public AutoResetEvent Waiter
		{
			get { return _waiter; }
		}

		public T Data
		{
			get { return _data; }
			set
			{
				_data = value;
				_waiter.Set();
			}
		}
	}
}
